<!DOCTYPE html>  
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN"> 
<head> 
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>优惠券发放历史</title>
	<!-- 常规css -->
    <link th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet" />
    <link th:href="@{font-awesome/css/font-awesome.min.css}" rel="stylesheet" />
    <!-- 项目css -->
    <link th:href="@{css/layout.css}" rel="stylesheet" />
</head> 
<body th:with="asort=${#httpServletRequest.getParameter('sort')}, aorder=${#httpServletRequest.getParameter('order')}, num=${data.num}, pageIndex=${data.pageIndex}">
	<!-- 侧边导航栏 -->
	<div th:replace="aframe::sideNavigation"></div>
	
	<!-- 主页面 -->
	<div class="content" style="padding:0">
		<!-- 顶部导航栏 -->
		<div th:replace="aframe::topNavigation"></div>
		<!-- 内容 -->

		<!-- 标签页内容 -->
		<div role="tabpanel" class="tab-pane active" id="history" style="margin:20px">
			<div class="panel panel-default" >
				<div class="panel-heading">
					<h4>发放历史&nbsp;&nbsp;</h4>
				</div>
				<div class="panel-body table-responsive">
					<table class="table table-hover">
						<thead>
						<tr>
							<th>编号</th>
							<th>模板ID</th>
							<th>优惠券名</th>
							<th>用户ID</th>
							<th>发放时间</th>
							<th>到期时间</th>
							<th>状态</th>
							<th>关联订单</th>
						</tr>
						</thead>
						<tbody>
						<tr th:each="coupon: ${data.list}">
							<th scope="row" th:text="${coupon?.couponId}">编号</th>
							<td th:text="${coupon?.temId}">模板id</td>
							<td th:text="${coupon?.temName}">优惠券名</td>
							<td th:text="${coupon?.wxUserId}">用户id</td>
							<td th:text="${#dates.format(coupon?.couponTime, 'yyyy-MM-dd')}">发放时间</td>
							<td th:text="${#dates.format(coupon?.endTime, 'yyyy-MM-dd')}">到期时间</td>
							<td th:text="${coupon?.isUsed eq 0} ? '未使用' : '已使用'">状态</td>
							<td th:text="${coupon?.ordersId} ? ${coupon?.ordersId} : '暂无'">关联订单</td>
						</tr>
						</tbody>
					</table>

					<!-- 分页 -->
					<div th:replace="aframe::pagingBar"></div>

				</div>
			</div>
		</div>
	</div>
		<!-- end 内容 -->
	<!-- end 主页面 -->


	<!-- 模态框: 修改密码 -->
	<div th:replace="aframe::modifyPwd"></div>

<!-- 常规js -->
<script th:src="@{js/jquery-3.4.1.min.js}"></script>
<script th:src="@{bootstrap/js/bootstrap.min.js}"></script>
<!-- 模板js -->
<script th:replace="aframe::js-highlight"></script>
<!-- 项目js -->
<script th:src="@{js/md5.js}"></script>
<script th:src="@{js/setpwd.js}"></script>

</body>
</html> 

